Edge detection technique having improved feature visibility

ABSTRACT

A method for determining edge features of an image comprising filtering at least a portion of the image to attenuate high frequency signals of the image to an extent greater than low frequency signals of the image. Performing a one-dimensional search in a two different horizontal directions relative to a particular pixel of the image to determine horizontal direction local maximums. Calculating a horizontal gradient based upon the horizontal direction local maximums. Performing a one-dimensional search in a two vertical horizontal directions relative to a particular pixel of the image to determine vertical direction local maximums. Calculating a vertical gradient based upon the vertical direction local maximums. Calculating a gradient for the particular pixel based upon the horizontal gradient and the vertical gradient.

CROSS-REFERENCE TO RELATED APPLICATIONS

Not applicable.

BACKGROUND OF THE INVENTION

The present invention relates generally to an edge detection technique having improved feature visibility.

Different image processing techniques are used for different purposes. In many cases, an image processing technique is used to identify edges (or otherwise gradients) within images (or images of a video). Identified edges within an image may be subsequently used for many different applications. For example, the edge identification may be used for motion estimation, image segmentation, target tracking, etc.

Edge identification may be implemented using the differences between the color values (e.g., the intensity) of the pixels included within a region of the image. The pixel differences may include detecting the positions of abrupt changes in the pixel values, and recognizing such positions as corresponding to the outlines of objects. In many cases a low pass filter is first applied to the image, and then the changes are determined for each of the pixels for which a first derivative of the intensity variation gradient within the image reaches a local maximum and exceeds a predetermined threshold value. Each such determination is assumed to be located on an edge of an object in the image.

Another edge detection technique includes a “zero-crossing”, whereby the zero crossings of the second derivative of the gradient are detected to identify the edge locations.

Another edge detection technique includes the use of predetermined shape templates that are compared with the image to identify the approximate positions of objects, with the edge identification technique being applied to the identified objects.

What is desired is a signal processing technique for enhancing the identification of gradients.

The foregoing and other objectives, features, and advantages of the invention will be more readily understood upon consideration of the following detailed description of the invention, taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 illustrates image masks.

FIG. 2 illustrates image edges with omissions.

FIG. 3 illustrates a gradient estimation technique.

FIG. 4 illustrates image edges with fewer omissions.

FIG. 5 illustrates an intensity edge in an image.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT

Image gradient (or image derivative) is a fundamental technique used in digital image processing. The image gradient identifies information about discontinuities within the image, and is frequently a prominent feature that immediately grasps the viewer's attention. The image gradient is used in conjunction with many image processing and computer vision techniques including, for example, image segmentation, object recognition, object contour extraction, edge detection, 3D, image up-scaling and interpolation, image deposing, image enhancement, motion estimation, visual target tracking, etc. The image gradient may be built upon an image derivative (or a similar such function). A basic definition of the first-order derivative of a one-dimensional function ƒ(x) may be defined as:

$\begin{matrix} {\frac{\partial f}{\partial x} = {\frac{{f\left( {x + 1} \right)} - {f(x)}}{\left( {x + 1} \right) - x} = {{f\left( {x + 1} \right)} - {f(x)}}}} & (1) \end{matrix}$

The notation uses a partial derivative in order to keep the notation the same as when considering an image function of two (or more) variables, ƒ(x, y), which describes partial derivatives along the two (or more) spatial axes.

Similarly, a basic definition of the second order derivative of the one-dimensional function ƒ(x) may be defined as:

$\begin{matrix} {\frac{\partial^{2}f}{\partial x^{2}} = {\frac{{f\left( {x + 1} \right)} + {f\left( {x - 1} \right)} - {2{f(x)}}}{\left( {x + 1} \right) - x} = {{f\left( {x + 1} \right)} + {f\left( {x - 1} \right)} - {2{f(x)}}}}} & (2) \end{matrix}$

Several exemplary gradient estimation operators include the Prewitt operator, Sobel operator, Roberts operator, and Laplacian operator. The first three operators are capable of detecting the first-order derivative, and the Laplacian operator is a second-order derivative estimator. The corresponding image processing masks for these operators are shown in FIG. 1. These edge detection/gradient estimation operators can identify the edges of object contours. However, the resulting gradient maps generated by these operators tend to contain many broken edge lines, making the boundary of object structure not well-defined. For many applications, this limitation will be harmful as it will inhibit the viewer from grasping a key feature of the image. Referring to FIG. 2, a gradient map obtained by the Sobel operator results in structures in the circled areas not being well defined.

It was determined that one reason for this structure identification limitation is that these operators employ a small spatial neighborhood for computing the gradients, therefore making it less aware of the existence of pixels in the local neighborhood that have a larger gradient. To reduce this limitation, a modified gradient estimation technique should include a larger spatial support together with determining a local maximum gradient.

A modified gradient technique may include initially low-pass filtering 100 and/or down-sampling 102 of an input image 104. The low-pass filtering 100 and down-sampling 102 reduces power consumption and also suppresses noise in the input image 104, which, if otherwise not modified, would result in erroneous results in subsequent gradient estimation.

For each input pixel p(x, y), along the horizontal axis, the modified image gradient technique performs a 1-dimensional search in two directions 106, towards the left and towards the right of the current point, to determine the local maximum gradient. This may be expressed as: g _(left)(p)=max{g(p(x,y),p(x+i,y))|i=−1:−W} g _(right)(p)=max{g(p(x,y),p(x+i,y))|i=1:W}  (2)

W represents the size of search window, which is preferably set to 3.

Along the vertical axis, similarly, the modified image gradient technique performs a 1-dimensional search in two directions 108, above and below the current point, to determine the local maximum gradient. This may be expressed as: g _(up)(p)=max{g(p(x,y),p(x,y+j))|j=−1:−W} g _(down)(p)=max{g(p(x,y),p(x,y+j))|j=1:W}  (3)

The gradient at pixel p(x,y) with respect to p(x+i,y) 110 may be defined as:

$\begin{matrix} {{g\left( {{p\left( {x,y} \right)},{p\left( {{x + i},y} \right)}} \right)} = \frac{{f\left( {{x + i},y} \right)} - {f\left( {x,y} \right)}}{{\left( {x + i} \right) - x}}} & (4) \end{matrix}$

The gradient at pixel p(x,y) with respect to p(x,y+j) 112 may be defined as:

$\begin{matrix} {{g\left( {{p\left( {x,y} \right)},{p\left( {x,{y + j}} \right)}} \right)} = \frac{{f\left( {x,{y + j}} \right)} - {f\left( {x,y} \right)}}{{\left( {y + j} \right) - y}}} & (5) \end{matrix}$

Where function ƒ(x,y) is the image intensity at pixel p(x,y). The gradient is generally the intensity difference between point p(x,y) and point p(x+i,y) weighted by their 1-dimensional spatial distance.

On both horizontal axis and vertical axis, the gradients from the two search directions are added 114 to obtain one horizontal and one vertical gradient respectively, as follows: g _(x)(p)=g _(left)(p)+g _(right)(p) g _(y)(p)=g _(up)(p)+g _(down)(p)  (6)

The horizontal or vertical gradient, g_(x)(p) or g_(y)(p) is generally a second order derivative at pixel p(x,y). The resulting gradient (or the parts thereof) are preferably thresholded 116 in any suitable manner.

The proof for the gradients being a second order derivative is provided as follows (for the simplicity of notation, they coordinates are omitted). Suppose the local maximum gradient to the left of p(x) is g_(left)(p)=g(p(x), p(x−i)), i>0, and the local maximum gradient to the right of p(x) is g_(right)(p)=g(p(x), p(x+j)), j>0, then

$\begin{matrix} \begin{matrix} {{g_{x}(p)} = {{g_{left}(p)} + {g_{right}(p)}}} \\ {= {{g\left( {{p(x)},{p\left( {x - i} \right)}} \right)} + {g\left( {{p(x)},{p\left( {x + j} \right)}} \right)}}} \\ {= {\frac{{f\left( {x - i} \right)} - {f(x)}}{i} + \frac{{f\left( {x + j} \right)} - {f(x)}}{j}}} \\ {= \frac{{{jf}\left( {x - i} \right)} + {{if}\left( {x + j} \right)} - {\left( {i + j} \right){f(x)}}}{ij}} \\ {= {\frac{f\left( {x - i} \right)}{i} + \frac{f\left( {x + j} \right)}{j} - \frac{\left( {i + j} \right){f(x)}}{ij}}} \\ {= {{{af}\left( {x - i} \right)} + {{bf}\left( {x + j} \right)} - {\left( {a + b} \right){f(x)}}}} \end{matrix} & (7) \end{matrix}$

Based on the definition of second-order derivative, it may be observed that the technique estimates the second order derivative as the gradient.

The final gradient at pixel p(x, y) is given by the largest of the two gradient:

$\begin{matrix} {{g(p)} = \left\{ \begin{matrix} {g_{x}(p)} & {{{if}\mspace{14mu}{{g_{x}(p)}}} \geq {{g_{y}(p)}}} \\ {g_{y}(p)} & {otherwise} \end{matrix} \right.} & (8) \end{matrix}$

After the gradient at each pixel is obtained, it is typically thresholded to reduce the low-amplitude gradients from the image. By doing this, the excessive noisy gradients can be removed.

$\begin{matrix} {{g(p)} = \left\{ \begin{matrix} {{g(p)},} & {{g(p)} > T} \\ {0,} & {otherwise} \end{matrix} \right.} & (9) \end{matrix}$

Referring to FIG. 4, the modified technique is able to generate well-defined object contours.

Referring to FIG. 5, the benefits of the technique are illustrated. x₀ is the central pixel, others are the neighborhood pixels. If one applies a 1×3 Laplacian filter to compute the second-order derivative at x₀, it will give small gradient: g _(lap)(x ₀)=ƒ(x ₁)+ƒ(x ⁻¹)−2ƒ(x ₀)≈10

However, with the described technique, a 1×7 window centered at x₀ may be used to compute the local maximum gradient at x₀, given by: g _(new)(x ₀)=g _(lef) t(x ₀)+g _(right)(x ₀)≈(−5)+30=25

Therefore with local maximum gradient search, the described technique is able to reduce those pixels with a small gradient from being detected as edges, and it can detect strong gradient in a local neighborhood which may not be detectable by other techniques. This results in a gradient map that is cleaner and includes more well defined object contours. Also, the larger spatial support in computing the gradients reduces the effects of noise.

The terms and expressions which have been employed in the foregoing specification are used therein as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims which follow. 

1. A method for determining edge features of an image comprising: (a) filtering at least a portion of said image to attenuate high frequency signals of said image to an extent greater than low frequency signals of said image; (b) performing a one-dimensional search in a first horizontal direction relative to a particular pixel of said image to determine a first horizontal direction local maximum; (c) performing a one-dimensional search in a second horizontal direction relative to said particular pixel of said image to determine a second horizontal direction local maximum; (d) calculating a horizontal gradient based upon said first horizontal direction local maximum and said second horizontal direction local maximum; (e) performing a one-dimensional search in a first vertical direction relative to a particular pixel of said image to determine a first vertical direction local maximum; (f) performing a one-dimensional search in a second vertical direction relative to said particular pixel of said image to determine a second vertical direction local maximum; (g) calculating a vertical gradient based upon said first vertical direction local maximum and said second vertical direction local maximum; (h) calculating a gradient for said particular pixel based upon said horizontal gradient and said vertical gradient.
 2. The method of claim 1 wherein said first and second horizontal directions are based upon more than 3 pixels.
 3. The method of claim 1 wherein said first and second vertical directions are based upon more than 3 pixels.
 4. The method of claim 1 wherein said gradient is thresholded.
 5. The method of claim 1 wherein said horizontal searches and vertical searches are independent of one another.
 6. The method of claim 1 wherein said calculating said horizontal gradient is based upon the summation of said first and second horizontal gradients.
 7. The method of claim 1 wherein said calculating said vertical gradient is based upon the summation of said first and second vertical gradients.
 8. The method of claim 1 wherein said gradient is based upon the larger of said vertical gradient and said horizontal gradients.
 9. The method of claim 1 wherein said calculations are based upon the gray scale of said image.
 10. The method of claim 1 further comprising down-sampling said image. 